Model fit

Column

Assumption checks

Package `patchwork` required for this function to work.package 'patchwork' successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\kevin\AppData\Local\Temp\RtmpULxrCp\downloaded_packages

Column

Indices of model fit

Metric Value
AIC 16802.99
AICc 16803.13
BIC 16919.57
R2 (cond.) 0.03
R2 (marg.) 0.02
ICC 5.55e-03
RMSE 1.37
Sigma 1.38

For interpretation of performance metrics, please refer to this documentation.

Parameter estimates

Column

Plot

Column

Tabular summary

# Fixed Effects
Parameter Coefficient SE 95% CI t(4783) p
(Intercept) 5.95 0.38 (5.20, 6.69) 15.71 < .001
educacion rec [Ed Media] -0.16 0.08 (-0.32, -4.19e-03) -2.01 0.044
educacion rec [Ed Tecnica] -0.14 0.09 (-0.31, 0.03) -1.64 0.101
educacion rec [Universidad o posgrado] -0.08 0.09 (-0.25, 0.09) -0.92 0.358
educacion rec [Ns/Nr] -0.02 0.08 (-0.17, 0.14) -0.20 0.842
libros rec [Más de 25] 0.04 0.04 (-0.05, 0.12) 0.81 0.419
apod acc div 0.07 0.02 (0.04, 0.11) 3.93 < .001
civic [Nivel D] 0.19 0.12 (-0.04, 0.41) 1.63 0.103
civic [Nivel C] 0.36 0.11 (0.14, 0.58) 3.27 0.001
civic [Nivel B] 0.54 0.11 (0.32, 0.76) 4.89 < .001
civic [Nivel A] 0.62 0.11 (0.40, 0.85) 5.48 < .001
apdis fa 0.07 0.02 (0.02, 0.12) 2.69 0.007
mean apdis fa -0.05 0.08 (-0.22, 0.11) -0.63 0.527
etnia2 0.08 0.08 (-0.08, 0.23) 0.96 0.335
inmigrante2 0.29 0.58 (-0.85, 1.43) 0.50 0.619
escolaridad -0.04 0.04 (-0.12, 0.04) -0.90 0.368
# Random Effects
Parameter Coefficient
SD (Intercept: mrbd) 0.10
SD (Residual) 1.38

To find out more about table summary options, please refer to this documentation.

Predicted Values

Column

Plot

Column

Tabular summary

Model-based Expectation
educacion_rec mrbd Predicted SE 95% CI
Ed Basica 0.00 6.15
Ed Media 0.00 5.99
Ed Tecnica 0.00 6.01
Universidad o posgrado 0.00 6.07
Ns/Nr 0.00 6.14

Variable predicted: est_acc_div

Predictors modulated: educacion_rec

Predictors controlled: libros_rec (1), apod_acc_div (6.6), civic (1), apdis_fa (-0.0072), mean_apdis_fa (-0.0036), etnia2 (0.35), inmigrante2 (0.019), escolaridad (8.6)

Model-based Expectation
libros_rec mrbd Predicted SE 95% CI
Menos de 25 0.00 6.15
Más de 25 0.00 6.19

Variable predicted: est_acc_div

Predictors modulated: libros_rec

Predictors controlled: educacion_rec (1), apod_acc_div (6.6), civic (1), apdis_fa (-0.0072), mean_apdis_fa (-0.0036), etnia2 (0.35), inmigrante2 (0.019), escolaridad (8.6)

Model-based Expectation
apod_acc_div mrbd Predicted SE 95% CI
2.39 0.00 5.84
3.45 0.00 5.92
4.50 0.00 5.99
5.55 0.00 6.07
6.60 0.00 6.15
7.65 0.00 6.23
8.70 0.00 6.31
9.75 0.00 6.39
10.81 0.00 6.47
11.86 0.00 6.54

Variable predicted: est_acc_div

Predictors modulated: apod_acc_div

Predictors controlled: educacion_rec (1), libros_rec (1), civic (1), apdis_fa (-0.0072), mean_apdis_fa (-0.0036), etnia2 (0.35), inmigrante2 (0.019), escolaridad (8.6)

Model-based Expectation
civic mrbd Predicted SE 95% CI
Bajo nivel D 0.00 6.15
Nivel D 0.00 6.34
Nivel C 0.00 6.51
Nivel B 0.00 6.69
Nivel A 0.00 6.77

Variable predicted: est_acc_div

Predictors modulated: civic

Predictors controlled: educacion_rec (1), libros_rec (1), apod_acc_div (6.6), apdis_fa (-0.0072), mean_apdis_fa (-0.0036), etnia2 (0.35), inmigrante2 (0.019), escolaridad (8.6)

Model-based Expectation
apdis_fa mrbd Predicted SE 95% CI
-3.40 0.00 5.92
-2.56 0.00 5.98
-1.71 0.00 6.04
-0.86 0.00 6.09
-7.24e-03 0.00 6.15
0.84 0.00 6.21
1.69 0.00 6.26
2.54 0.00 6.32
3.39 0.00 6.38
4.24 0.00 6.43

Variable predicted: est_acc_div

Predictors modulated: apdis_fa

Predictors controlled: educacion_rec (1), libros_rec (1), apod_acc_div (6.6), civic (1), mean_apdis_fa (-0.0036), etnia2 (0.35), inmigrante2 (0.019), escolaridad (8.6)

Model-based Expectation
mean_apdis_fa mrbd Predicted SE 95% CI
-1.09 0.00 6.21
-0.82 0.00 6.19
-0.55 0.00 6.18
-0.28 0.00 6.17
-3.65e-03 0.00 6.15
0.27 0.00 6.14
0.54 0.00 6.12
0.81 0.00 6.11
1.08 0.00 6.09
1.36 0.00 6.08

Variable predicted: est_acc_div

Predictors modulated: mean_apdis_fa

Predictors controlled: educacion_rec (1), libros_rec (1), apod_acc_div (6.6), civic (1), apdis_fa (-0.0072), etnia2 (0.35), inmigrante2 (0.019), escolaridad (8.6)

Model-based Expectation
etnia2 mrbd Predicted SE 95% CI
-0.90 0.00 6.06
-0.59 0.00 6.08
-0.28 0.00 6.10
0.04 0.00 6.13
0.35 0.00 6.15
0.66 0.00 6.18
0.97 0.00 6.20
1.29 0.00 6.22
1.60 0.00 6.25
1.91 0.00 6.27

Variable predicted: est_acc_div

Predictors modulated: etnia2

Predictors controlled: educacion_rec (1), libros_rec (1), apod_acc_div (6.6), civic (1), apdis_fa (-0.0072), mean_apdis_fa (-0.0036), inmigrante2 (0.019), escolaridad (8.6)

Model-based Expectation
inmigrante2 mrbd Predicted SE 95% CI
-0.14 0.00 6.10
-0.10 0.00 6.12
-0.06 0.00 6.13
-0.02 0.00 6.14
0.02 0.00 6.15
0.06 0.00 6.16
0.10 0.00 6.17
0.14 0.00 6.19
0.18 0.00 6.20
0.22 0.00 6.21

Variable predicted: est_acc_div

Predictors modulated: inmigrante2

Predictors controlled: educacion_rec (1), libros_rec (1), apod_acc_div (6.6), civic (1), apdis_fa (-0.0072), mean_apdis_fa (-0.0036), etnia2 (0.35), escolaridad (8.6)

Model-based Expectation
escolaridad mrbd Predicted SE 95% CI
6.11 0.00 6.24
6.74 0.00 6.22
7.36 0.00 6.20
7.98 0.00 6.17
8.60 0.00 6.15
9.23 0.00 6.13
9.85 0.00 6.10
10.47 0.00 6.08
11.10 0.00 6.06
11.72 0.00 6.04

Variable predicted: est_acc_div

Predictors modulated: escolaridad

Predictors controlled: educacion_rec (1), libros_rec (1), apod_acc_div (6.6), civic (1), apdis_fa (-0.0072), mean_apdis_fa (-0.0036), etnia2 (0.35), inmigrante2 (0.019)

Text reports

Column

Textual summary

We fitted a linear mixed model (estimated using REML and nloptwrap optimizer) to predict est_acc_div with educacion_rec (formula: est_acc_div ~ educacion_rec + libros_rec + apod_acc_div + civic + apdis_fa + mean_apdis_fa + etnia2 + inmigrante2 + escolaridad). The model included mrbd as random effect (formula: ~1 | mrbd). The model’s total explanatory power is weak (conditional R2 = 0.03) and the part related to the fixed effects alone (marginal R2) is of 0.02. The model’s intercept, corresponding to educacion_rec = Ed Basica, is at 5.95 (95% CI (5.20, 6.69), t(4783) = 15.71, p < .001). Within this model:

  • The effect of educacion rec (Ed Media) is statistically significant and negative (beta = -0.16, 95% CI (-0.32, -4.19e-03), t(4783) = -2.01, p = 0.044; Std. beta = -0.11, 95% CI (-0.23, -3.00e-03))
  • The effect of educacion rec (Ed Tecnica) is statistically non-significant and negative (beta = -0.14, 95% CI (-0.31, 0.03), t(4783) = -1.64, p = 0.101; Std. beta = -0.10, 95% CI (-0.22, 0.02))
  • The effect of educacion rec (Universidad o posgrado) is statistically non-significant and negative (beta = -0.08, 95% CI (-0.25, 0.09), t(4783) = -0.92, p = 0.358; Std. beta = -0.06, 95% CI (-0.18, 0.07))
  • The effect of educacion rec (Ns/Nr) is statistically non-significant and negative (beta = -0.02, 95% CI (-0.17, 0.14), t(4783) = -0.20, p = 0.842; Std. beta = -0.01, 95% CI (-0.12, 0.10))
  • The effect of libros rec (Más de 25) is statistically non-significant and positive (beta = 0.04, 95% CI (-0.05, 0.12), t(4783) = 0.81, p = 0.419; Std. beta = 0.03, 95% CI (-0.04, 0.09))
  • The effect of apod acc div is statistically significant and positive (beta = 0.07, 95% CI (0.04, 0.11), t(4783) = 3.93, p < .001; Std. beta = 0.06, 95% CI (0.03, 0.08))
  • The effect of civic (Nivel D) is statistically non-significant and positive (beta = 0.19, 95% CI (-0.04, 0.41), t(4783) = 1.63, p = 0.103; Std. beta = 0.13, 95% CI (-0.03, 0.30))
  • The effect of civic (Nivel C) is statistically significant and positive (beta = 0.36, 95% CI (0.14, 0.58), t(4783) = 3.27, p = 0.001; Std. beta = 0.26, 95% CI (0.10, 0.41))
  • The effect of civic (Nivel B) is statistically significant and positive (beta = 0.54, 95% CI (0.32, 0.76), t(4783) = 4.89, p < .001; Std. beta = 0.39, 95% CI (0.23, 0.54))
  • The effect of civic (Nivel A) is statistically significant and positive (beta = 0.62, 95% CI (0.40, 0.85), t(4783) = 5.48, p < .001; Std. beta = 0.45, 95% CI (0.29, 0.61))
  • The effect of apdis fa is statistically significant and positive (beta = 0.07, 95% CI (0.02, 0.12), t(4783) = 2.69, p = 0.007; Std. beta = 0.04, 95% CI (0.01, 0.07))
  • The effect of mean apdis fa is statistically non-significant and negative (beta = -0.05, 95% CI (-0.22, 0.11), t(4783) = -0.63, p = 0.527; Std. beta = -0.01, 95% CI (-0.04, 0.02))
  • The effect of etnia2 is statistically non-significant and positive (beta = 0.08, 95% CI (-0.08, 0.23), t(4783) = 0.96, p = 0.335; Std. beta = 0.02, 95% CI (-0.02, 0.05))
  • The effect of inmigrante2 is statistically non-significant and positive (beta = 0.29, 95% CI (-0.85, 1.43), t(4783) = 0.50, p = 0.619; Std. beta = 8.48e-03, 95% CI (-0.02, 0.04))
  • The effect of escolaridad is statistically non-significant and negative (beta = -0.04, 95% CI (-0.12, 0.04), t(4783) = -0.90, p = 0.368; Std. beta = -0.02, 95% CI (-0.05, 0.02))

Standardized parameters were obtained by fitting the model on a standardized version of the dataset. 95% Confidence Intervals (CIs) and p-values were computed using a Wald t-distribution approximation., We fitted a linear mixed model (estimated using REML and nloptwrap optimizer) to predict est_acc_div with libros_rec (formula: est_acc_div ~ educacion_rec + libros_rec + apod_acc_div + civic + apdis_fa + mean_apdis_fa + etnia2 + inmigrante2 + escolaridad). The model included mrbd as random effect (formula: ~1 | mrbd). The model’s total explanatory power is weak (conditional R2 = 0.03) and the part related to the fixed effects alone (marginal R2) is of 0.02. The model’s intercept, corresponding to libros_rec = Menos de 25, is at 5.95 (95% CI (5.20, 6.69), t(4783) = 15.71, p < .001). Within this model:

  • The effect of educacion rec (Ed Media) is statistically significant and negative (beta = -0.16, 95% CI (-0.32, -4.19e-03), t(4783) = -2.01, p = 0.044; Std. beta = -0.11, 95% CI (-0.23, -3.00e-03))
  • The effect of educacion rec (Ed Tecnica) is statistically non-significant and negative (beta = -0.14, 95% CI (-0.31, 0.03), t(4783) = -1.64, p = 0.101; Std. beta = -0.10, 95% CI (-0.22, 0.02))
  • The effect of educacion rec (Universidad o posgrado) is statistically non-significant and negative (beta = -0.08, 95% CI (-0.25, 0.09), t(4783) = -0.92, p = 0.358; Std. beta = -0.06, 95% CI (-0.18, 0.07))
  • The effect of educacion rec (Ns/Nr) is statistically non-significant and negative (beta = -0.02, 95% CI (-0.17, 0.14), t(4783) = -0.20, p = 0.842; Std. beta = -0.01, 95% CI (-0.12, 0.10))
  • The effect of libros rec (Más de 25) is statistically non-significant and positive (beta = 0.04, 95% CI (-0.05, 0.12), t(4783) = 0.81, p = 0.419; Std. beta = 0.03, 95% CI (-0.04, 0.09))
  • The effect of apod acc div is statistically significant and positive (beta = 0.07, 95% CI (0.04, 0.11), t(4783) = 3.93, p < .001; Std. beta = 0.06, 95% CI (0.03, 0.08))
  • The effect of civic (Nivel D) is statistically non-significant and positive (beta = 0.19, 95% CI (-0.04, 0.41), t(4783) = 1.63, p = 0.103; Std. beta = 0.13, 95% CI (-0.03, 0.30))
  • The effect of civic (Nivel C) is statistically significant and positive (beta = 0.36, 95% CI (0.14, 0.58), t(4783) = 3.27, p = 0.001; Std. beta = 0.26, 95% CI (0.10, 0.41))
  • The effect of civic (Nivel B) is statistically significant and positive (beta = 0.54, 95% CI (0.32, 0.76), t(4783) = 4.89, p < .001; Std. beta = 0.39, 95% CI (0.23, 0.54))
  • The effect of civic (Nivel A) is statistically significant and positive (beta = 0.62, 95% CI (0.40, 0.85), t(4783) = 5.48, p < .001; Std. beta = 0.45, 95% CI (0.29, 0.61))
  • The effect of apdis fa is statistically significant and positive (beta = 0.07, 95% CI (0.02, 0.12), t(4783) = 2.69, p = 0.007; Std. beta = 0.04, 95% CI (0.01, 0.07))
  • The effect of mean apdis fa is statistically non-significant and negative (beta = -0.05, 95% CI (-0.22, 0.11), t(4783) = -0.63, p = 0.527; Std. beta = -0.01, 95% CI (-0.04, 0.02))
  • The effect of etnia2 is statistically non-significant and positive (beta = 0.08, 95% CI (-0.08, 0.23), t(4783) = 0.96, p = 0.335; Std. beta = 0.02, 95% CI (-0.02, 0.05))
  • The effect of inmigrante2 is statistically non-significant and positive (beta = 0.29, 95% CI (-0.85, 1.43), t(4783) = 0.50, p = 0.619; Std. beta = 8.48e-03, 95% CI (-0.02, 0.04))
  • The effect of escolaridad is statistically non-significant and negative (beta = -0.04, 95% CI (-0.12, 0.04), t(4783) = -0.90, p = 0.368; Std. beta = -0.02, 95% CI (-0.05, 0.02))

Standardized parameters were obtained by fitting the model on a standardized version of the dataset. 95% Confidence Intervals (CIs) and p-values were computed using a Wald t-distribution approximation., We fitted a linear mixed model (estimated using REML and nloptwrap optimizer) to predict est_acc_div with apod_acc_div (formula: est_acc_div ~ educacion_rec + libros_rec + apod_acc_div + civic + apdis_fa + mean_apdis_fa + etnia2 + inmigrante2 + escolaridad). The model included mrbd as random effect (formula: ~1 | mrbd). The model’s total explanatory power is weak (conditional R2 = 0.03) and the part related to the fixed effects alone (marginal R2) is of 0.02. The model’s intercept, corresponding to apod_acc_div = 0, is at 5.95 (95% CI (5.20, 6.69), t(4783) = 15.71, p < .001). Within this model:

  • The effect of educacion rec (Ed Media) is statistically significant and negative (beta = -0.16, 95% CI (-0.32, -4.19e-03), t(4783) = -2.01, p = 0.044; Std. beta = -0.11, 95% CI (-0.23, -3.00e-03))
  • The effect of educacion rec (Ed Tecnica) is statistically non-significant and negative (beta = -0.14, 95% CI (-0.31, 0.03), t(4783) = -1.64, p = 0.101; Std. beta = -0.10, 95% CI (-0.22, 0.02))
  • The effect of educacion rec (Universidad o posgrado) is statistically non-significant and negative (beta = -0.08, 95% CI (-0.25, 0.09), t(4783) = -0.92, p = 0.358; Std. beta = -0.06, 95% CI (-0.18, 0.07))
  • The effect of educacion rec (Ns/Nr) is statistically non-significant and negative (beta = -0.02, 95% CI (-0.17, 0.14), t(4783) = -0.20, p = 0.842; Std. beta = -0.01, 95% CI (-0.12, 0.10))
  • The effect of libros rec (Más de 25) is statistically non-significant and positive (beta = 0.04, 95% CI (-0.05, 0.12), t(4783) = 0.81, p = 0.419; Std. beta = 0.03, 95% CI (-0.04, 0.09))
  • The effect of apod acc div is statistically significant and positive (beta = 0.07, 95% CI (0.04, 0.11), t(4783) = 3.93, p < .001; Std. beta = 0.06, 95% CI (0.03, 0.08))
  • The effect of civic (Nivel D) is statistically non-significant and positive (beta = 0.19, 95% CI (-0.04, 0.41), t(4783) = 1.63, p = 0.103; Std. beta = 0.13, 95% CI (-0.03, 0.30))
  • The effect of civic (Nivel C) is statistically significant and positive (beta = 0.36, 95% CI (0.14, 0.58), t(4783) = 3.27, p = 0.001; Std. beta = 0.26, 95% CI (0.10, 0.41))
  • The effect of civic (Nivel B) is statistically significant and positive (beta = 0.54, 95% CI (0.32, 0.76), t(4783) = 4.89, p < .001; Std. beta = 0.39, 95% CI (0.23, 0.54))
  • The effect of civic (Nivel A) is statistically significant and positive (beta = 0.62, 95% CI (0.40, 0.85), t(4783) = 5.48, p < .001; Std. beta = 0.45, 95% CI (0.29, 0.61))
  • The effect of apdis fa is statistically significant and positive (beta = 0.07, 95% CI (0.02, 0.12), t(4783) = 2.69, p = 0.007; Std. beta = 0.04, 95% CI (0.01, 0.07))
  • The effect of mean apdis fa is statistically non-significant and negative (beta = -0.05, 95% CI (-0.22, 0.11), t(4783) = -0.63, p = 0.527; Std. beta = -0.01, 95% CI (-0.04, 0.02))
  • The effect of etnia2 is statistically non-significant and positive (beta = 0.08, 95% CI (-0.08, 0.23), t(4783) = 0.96, p = 0.335; Std. beta = 0.02, 95% CI (-0.02, 0.05))
  • The effect of inmigrante2 is statistically non-significant and positive (beta = 0.29, 95% CI (-0.85, 1.43), t(4783) = 0.50, p = 0.619; Std. beta = 8.48e-03, 95% CI (-0.02, 0.04))
  • The effect of escolaridad is statistically non-significant and negative (beta = -0.04, 95% CI (-0.12, 0.04), t(4783) = -0.90, p = 0.368; Std. beta = -0.02, 95% CI (-0.05, 0.02))

Standardized parameters were obtained by fitting the model on a standardized version of the dataset. 95% Confidence Intervals (CIs) and p-values were computed using a Wald t-distribution approximation., We fitted a linear mixed model (estimated using REML and nloptwrap optimizer) to predict est_acc_div with civic (formula: est_acc_div ~ educacion_rec + libros_rec + apod_acc_div + civic + apdis_fa + mean_apdis_fa + etnia2 + inmigrante2 + escolaridad). The model included mrbd as random effect (formula: ~1 | mrbd). The model’s total explanatory power is weak (conditional R2 = 0.03) and the part related to the fixed effects alone (marginal R2) is of 0.02. The model’s intercept, corresponding to civic = Bajo nivel D, is at 5.95 (95% CI (5.20, 6.69), t(4783) = 15.71, p < .001). Within this model:

  • The effect of educacion rec (Ed Media) is statistically significant and negative (beta = -0.16, 95% CI (-0.32, -4.19e-03), t(4783) = -2.01, p = 0.044; Std. beta = -0.11, 95% CI (-0.23, -3.00e-03))
  • The effect of educacion rec (Ed Tecnica) is statistically non-significant and negative (beta = -0.14, 95% CI (-0.31, 0.03), t(4783) = -1.64, p = 0.101; Std. beta = -0.10, 95% CI (-0.22, 0.02))
  • The effect of educacion rec (Universidad o posgrado) is statistically non-significant and negative (beta = -0.08, 95% CI (-0.25, 0.09), t(4783) = -0.92, p = 0.358; Std. beta = -0.06, 95% CI (-0.18, 0.07))
  • The effect of educacion rec (Ns/Nr) is statistically non-significant and negative (beta = -0.02, 95% CI (-0.17, 0.14), t(4783) = -0.20, p = 0.842; Std. beta = -0.01, 95% CI (-0.12, 0.10))
  • The effect of libros rec (Más de 25) is statistically non-significant and positive (beta = 0.04, 95% CI (-0.05, 0.12), t(4783) = 0.81, p = 0.419; Std. beta = 0.03, 95% CI (-0.04, 0.09))
  • The effect of apod acc div is statistically significant and positive (beta = 0.07, 95% CI (0.04, 0.11), t(4783) = 3.93, p < .001; Std. beta = 0.06, 95% CI (0.03, 0.08))
  • The effect of civic (Nivel D) is statistically non-significant and positive (beta = 0.19, 95% CI (-0.04, 0.41), t(4783) = 1.63, p = 0.103; Std. beta = 0.13, 95% CI (-0.03, 0.30))
  • The effect of civic (Nivel C) is statistically significant and positive (beta = 0.36, 95% CI (0.14, 0.58), t(4783) = 3.27, p = 0.001; Std. beta = 0.26, 95% CI (0.10, 0.41))
  • The effect of civic (Nivel B) is statistically significant and positive (beta = 0.54, 95% CI (0.32, 0.76), t(4783) = 4.89, p < .001; Std. beta = 0.39, 95% CI (0.23, 0.54))
  • The effect of civic (Nivel A) is statistically significant and positive (beta = 0.62, 95% CI (0.40, 0.85), t(4783) = 5.48, p < .001; Std. beta = 0.45, 95% CI (0.29, 0.61))
  • The effect of apdis fa is statistically significant and positive (beta = 0.07, 95% CI (0.02, 0.12), t(4783) = 2.69, p = 0.007; Std. beta = 0.04, 95% CI (0.01, 0.07))
  • The effect of mean apdis fa is statistically non-significant and negative (beta = -0.05, 95% CI (-0.22, 0.11), t(4783) = -0.63, p = 0.527; Std. beta = -0.01, 95% CI (-0.04, 0.02))
  • The effect of etnia2 is statistically non-significant and positive (beta = 0.08, 95% CI (-0.08, 0.23), t(4783) = 0.96, p = 0.335; Std. beta = 0.02, 95% CI (-0.02, 0.05))
  • The effect of inmigrante2 is statistically non-significant and positive (beta = 0.29, 95% CI (-0.85, 1.43), t(4783) = 0.50, p = 0.619; Std. beta = 8.48e-03, 95% CI (-0.02, 0.04))
  • The effect of escolaridad is statistically non-significant and negative (beta = -0.04, 95% CI (-0.12, 0.04), t(4783) = -0.90, p = 0.368; Std. beta = -0.02, 95% CI (-0.05, 0.02))

Standardized parameters were obtained by fitting the model on a standardized version of the dataset. 95% Confidence Intervals (CIs) and p-values were computed using a Wald t-distribution approximation., We fitted a linear mixed model (estimated using REML and nloptwrap optimizer) to predict est_acc_div with apdis_fa (formula: est_acc_div ~ educacion_rec + libros_rec + apod_acc_div + civic + apdis_fa + mean_apdis_fa + etnia2 + inmigrante2 + escolaridad). The model included mrbd as random effect (formula: ~1 | mrbd). The model’s total explanatory power is weak (conditional R2 = 0.03) and the part related to the fixed effects alone (marginal R2) is of 0.02. The model’s intercept, corresponding to apdis_fa = 0, is at 5.95 (95% CI (5.20, 6.69), t(4783) = 15.71, p < .001). Within this model:

  • The effect of educacion rec (Ed Media) is statistically significant and negative (beta = -0.16, 95% CI (-0.32, -4.19e-03), t(4783) = -2.01, p = 0.044; Std. beta = -0.11, 95% CI (-0.23, -3.00e-03))
  • The effect of educacion rec (Ed Tecnica) is statistically non-significant and negative (beta = -0.14, 95% CI (-0.31, 0.03), t(4783) = -1.64, p = 0.101; Std. beta = -0.10, 95% CI (-0.22, 0.02))
  • The effect of educacion rec (Universidad o posgrado) is statistically non-significant and negative (beta = -0.08, 95% CI (-0.25, 0.09), t(4783) = -0.92, p = 0.358; Std. beta = -0.06, 95% CI (-0.18, 0.07))
  • The effect of educacion rec (Ns/Nr) is statistically non-significant and negative (beta = -0.02, 95% CI (-0.17, 0.14), t(4783) = -0.20, p = 0.842; Std. beta = -0.01, 95% CI (-0.12, 0.10))
  • The effect of libros rec (Más de 25) is statistically non-significant and positive (beta = 0.04, 95% CI (-0.05, 0.12), t(4783) = 0.81, p = 0.419; Std. beta = 0.03, 95% CI (-0.04, 0.09))
  • The effect of apod acc div is statistically significant and positive (beta = 0.07, 95% CI (0.04, 0.11), t(4783) = 3.93, p < .001; Std. beta = 0.06, 95% CI (0.03, 0.08))
  • The effect of civic (Nivel D) is statistically non-significant and positive (beta = 0.19, 95% CI (-0.04, 0.41), t(4783) = 1.63, p = 0.103; Std. beta = 0.13, 95% CI (-0.03, 0.30))
  • The effect of civic (Nivel C) is statistically significant and positive (beta = 0.36, 95% CI (0.14, 0.58), t(4783) = 3.27, p = 0.001; Std. beta = 0.26, 95% CI (0.10, 0.41))
  • The effect of civic (Nivel B) is statistically significant and positive (beta = 0.54, 95% CI (0.32, 0.76), t(4783) = 4.89, p < .001; Std. beta = 0.39, 95% CI (0.23, 0.54))
  • The effect of civic (Nivel A) is statistically significant and positive (beta = 0.62, 95% CI (0.40, 0.85), t(4783) = 5.48, p < .001; Std. beta = 0.45, 95% CI (0.29, 0.61))
  • The effect of apdis fa is statistically significant and positive (beta = 0.07, 95% CI (0.02, 0.12), t(4783) = 2.69, p = 0.007; Std. beta = 0.04, 95% CI (0.01, 0.07))
  • The effect of mean apdis fa is statistically non-significant and negative (beta = -0.05, 95% CI (-0.22, 0.11), t(4783) = -0.63, p = 0.527; Std. beta = -0.01, 95% CI (-0.04, 0.02))
  • The effect of etnia2 is statistically non-significant and positive (beta = 0.08, 95% CI (-0.08, 0.23), t(4783) = 0.96, p = 0.335; Std. beta = 0.02, 95% CI (-0.02, 0.05))
  • The effect of inmigrante2 is statistically non-significant and positive (beta = 0.29, 95% CI (-0.85, 1.43), t(4783) = 0.50, p = 0.619; Std. beta = 8.48e-03, 95% CI (-0.02, 0.04))
  • The effect of escolaridad is statistically non-significant and negative (beta = -0.04, 95% CI (-0.12, 0.04), t(4783) = -0.90, p = 0.368; Std. beta = -0.02, 95% CI (-0.05, 0.02))

Standardized parameters were obtained by fitting the model on a standardized version of the dataset. 95% Confidence Intervals (CIs) and p-values were computed using a Wald t-distribution approximation., We fitted a linear mixed model (estimated using REML and nloptwrap optimizer) to predict est_acc_div with mean_apdis_fa (formula: est_acc_div ~ educacion_rec + libros_rec + apod_acc_div + civic + apdis_fa + mean_apdis_fa + etnia2 + inmigrante2 + escolaridad). The model included mrbd as random effect (formula: ~1 | mrbd). The model’s total explanatory power is weak (conditional R2 = 0.03) and the part related to the fixed effects alone (marginal R2) is of 0.02. The model’s intercept, corresponding to mean_apdis_fa = 0, is at 5.95 (95% CI (5.20, 6.69), t(4783) = 15.71, p < .001). Within this model:

  • The effect of educacion rec (Ed Media) is statistically significant and negative (beta = -0.16, 95% CI (-0.32, -4.19e-03), t(4783) = -2.01, p = 0.044; Std. beta = -0.11, 95% CI (-0.23, -3.00e-03))
  • The effect of educacion rec (Ed Tecnica) is statistically non-significant and negative (beta = -0.14, 95% CI (-0.31, 0.03), t(4783) = -1.64, p = 0.101; Std. beta = -0.10, 95% CI (-0.22, 0.02))
  • The effect of educacion rec (Universidad o posgrado) is statistically non-significant and negative (beta = -0.08, 95% CI (-0.25, 0.09), t(4783) = -0.92, p = 0.358; Std. beta = -0.06, 95% CI (-0.18, 0.07))
  • The effect of educacion rec (Ns/Nr) is statistically non-significant and negative (beta = -0.02, 95% CI (-0.17, 0.14), t(4783) = -0.20, p = 0.842; Std. beta = -0.01, 95% CI (-0.12, 0.10))
  • The effect of libros rec (Más de 25) is statistically non-significant and positive (beta = 0.04, 95% CI (-0.05, 0.12), t(4783) = 0.81, p = 0.419; Std. beta = 0.03, 95% CI (-0.04, 0.09))
  • The effect of apod acc div is statistically significant and positive (beta = 0.07, 95% CI (0.04, 0.11), t(4783) = 3.93, p < .001; Std. beta = 0.06, 95% CI (0.03, 0.08))
  • The effect of civic (Nivel D) is statistically non-significant and positive (beta = 0.19, 95% CI (-0.04, 0.41), t(4783) = 1.63, p = 0.103; Std. beta = 0.13, 95% CI (-0.03, 0.30))
  • The effect of civic (Nivel C) is statistically significant and positive (beta = 0.36, 95% CI (0.14, 0.58), t(4783) = 3.27, p = 0.001; Std. beta = 0.26, 95% CI (0.10, 0.41))
  • The effect of civic (Nivel B) is statistically significant and positive (beta = 0.54, 95% CI (0.32, 0.76), t(4783) = 4.89, p < .001; Std. beta = 0.39, 95% CI (0.23, 0.54))
  • The effect of civic (Nivel A) is statistically significant and positive (beta = 0.62, 95% CI (0.40, 0.85), t(4783) = 5.48, p < .001; Std. beta = 0.45, 95% CI (0.29, 0.61))
  • The effect of apdis fa is statistically significant and positive (beta = 0.07, 95% CI (0.02, 0.12), t(4783) = 2.69, p = 0.007; Std. beta = 0.04, 95% CI (0.01, 0.07))
  • The effect of mean apdis fa is statistically non-significant and negative (beta = -0.05, 95% CI (-0.22, 0.11), t(4783) = -0.63, p = 0.527; Std. beta = -0.01, 95% CI (-0.04, 0.02))
  • The effect of etnia2 is statistically non-significant and positive (beta = 0.08, 95% CI (-0.08, 0.23), t(4783) = 0.96, p = 0.335; Std. beta = 0.02, 95% CI (-0.02, 0.05))
  • The effect of inmigrante2 is statistically non-significant and positive (beta = 0.29, 95% CI (-0.85, 1.43), t(4783) = 0.50, p = 0.619; Std. beta = 8.48e-03, 95% CI (-0.02, 0.04))
  • The effect of escolaridad is statistically non-significant and negative (beta = -0.04, 95% CI (-0.12, 0.04), t(4783) = -0.90, p = 0.368; Std. beta = -0.02, 95% CI (-0.05, 0.02))

Standardized parameters were obtained by fitting the model on a standardized version of the dataset. 95% Confidence Intervals (CIs) and p-values were computed using a Wald t-distribution approximation., We fitted a linear mixed model (estimated using REML and nloptwrap optimizer) to predict est_acc_div with etnia2 (formula: est_acc_div ~ educacion_rec + libros_rec + apod_acc_div + civic + apdis_fa + mean_apdis_fa + etnia2 + inmigrante2 + escolaridad). The model included mrbd as random effect (formula: ~1 | mrbd). The model’s total explanatory power is weak (conditional R2 = 0.03) and the part related to the fixed effects alone (marginal R2) is of 0.02. The model’s intercept, corresponding to etnia2 = 0, is at 5.95 (95% CI (5.20, 6.69), t(4783) = 15.71, p < .001). Within this model:

  • The effect of educacion rec (Ed Media) is statistically significant and negative (beta = -0.16, 95% CI (-0.32, -4.19e-03), t(4783) = -2.01, p = 0.044; Std. beta = -0.11, 95% CI (-0.23, -3.00e-03))
  • The effect of educacion rec (Ed Tecnica) is statistically non-significant and negative (beta = -0.14, 95% CI (-0.31, 0.03), t(4783) = -1.64, p = 0.101; Std. beta = -0.10, 95% CI (-0.22, 0.02))
  • The effect of educacion rec (Universidad o posgrado) is statistically non-significant and negative (beta = -0.08, 95% CI (-0.25, 0.09), t(4783) = -0.92, p = 0.358; Std. beta = -0.06, 95% CI (-0.18, 0.07))
  • The effect of educacion rec (Ns/Nr) is statistically non-significant and negative (beta = -0.02, 95% CI (-0.17, 0.14), t(4783) = -0.20, p = 0.842; Std. beta = -0.01, 95% CI (-0.12, 0.10))
  • The effect of libros rec (Más de 25) is statistically non-significant and positive (beta = 0.04, 95% CI (-0.05, 0.12), t(4783) = 0.81, p = 0.419; Std. beta = 0.03, 95% CI (-0.04, 0.09))
  • The effect of apod acc div is statistically significant and positive (beta = 0.07, 95% CI (0.04, 0.11), t(4783) = 3.93, p < .001; Std. beta = 0.06, 95% CI (0.03, 0.08))
  • The effect of civic (Nivel D) is statistically non-significant and positive (beta = 0.19, 95% CI (-0.04, 0.41), t(4783) = 1.63, p = 0.103; Std. beta = 0.13, 95% CI (-0.03, 0.30))
  • The effect of civic (Nivel C) is statistically significant and positive (beta = 0.36, 95% CI (0.14, 0.58), t(4783) = 3.27, p = 0.001; Std. beta = 0.26, 95% CI (0.10, 0.41))
  • The effect of civic (Nivel B) is statistically significant and positive (beta = 0.54, 95% CI (0.32, 0.76), t(4783) = 4.89, p < .001; Std. beta = 0.39, 95% CI (0.23, 0.54))
  • The effect of civic (Nivel A) is statistically significant and positive (beta = 0.62, 95% CI (0.40, 0.85), t(4783) = 5.48, p < .001; Std. beta = 0.45, 95% CI (0.29, 0.61))
  • The effect of apdis fa is statistically significant and positive (beta = 0.07, 95% CI (0.02, 0.12), t(4783) = 2.69, p = 0.007; Std. beta = 0.04, 95% CI (0.01, 0.07))
  • The effect of mean apdis fa is statistically non-significant and negative (beta = -0.05, 95% CI (-0.22, 0.11), t(4783) = -0.63, p = 0.527; Std. beta = -0.01, 95% CI (-0.04, 0.02))
  • The effect of etnia2 is statistically non-significant and positive (beta = 0.08, 95% CI (-0.08, 0.23), t(4783) = 0.96, p = 0.335; Std. beta = 0.02, 95% CI (-0.02, 0.05))
  • The effect of inmigrante2 is statistically non-significant and positive (beta = 0.29, 95% CI (-0.85, 1.43), t(4783) = 0.50, p = 0.619; Std. beta = 8.48e-03, 95% CI (-0.02, 0.04))
  • The effect of escolaridad is statistically non-significant and negative (beta = -0.04, 95% CI (-0.12, 0.04), t(4783) = -0.90, p = 0.368; Std. beta = -0.02, 95% CI (-0.05, 0.02))

Standardized parameters were obtained by fitting the model on a standardized version of the dataset. 95% Confidence Intervals (CIs) and p-values were computed using a Wald t-distribution approximation., We fitted a linear mixed model (estimated using REML and nloptwrap optimizer) to predict est_acc_div with inmigrante2 (formula: est_acc_div ~ educacion_rec + libros_rec + apod_acc_div + civic + apdis_fa + mean_apdis_fa + etnia2 + inmigrante2 + escolaridad). The model included mrbd as random effect (formula: ~1 | mrbd). The model’s total explanatory power is weak (conditional R2 = 0.03) and the part related to the fixed effects alone (marginal R2) is of 0.02. The model’s intercept, corresponding to inmigrante2 = 0, is at 5.95 (95% CI (5.20, 6.69), t(4783) = 15.71, p < .001). Within this model:

  • The effect of educacion rec (Ed Media) is statistically significant and negative (beta = -0.16, 95% CI (-0.32, -4.19e-03), t(4783) = -2.01, p = 0.044; Std. beta = -0.11, 95% CI (-0.23, -3.00e-03))
  • The effect of educacion rec (Ed Tecnica) is statistically non-significant and negative (beta = -0.14, 95% CI (-0.31, 0.03), t(4783) = -1.64, p = 0.101; Std. beta = -0.10, 95% CI (-0.22, 0.02))
  • The effect of educacion rec (Universidad o posgrado) is statistically non-significant and negative (beta = -0.08, 95% CI (-0.25, 0.09), t(4783) = -0.92, p = 0.358; Std. beta = -0.06, 95% CI (-0.18, 0.07))
  • The effect of educacion rec (Ns/Nr) is statistically non-significant and negative (beta = -0.02, 95% CI (-0.17, 0.14), t(4783) = -0.20, p = 0.842; Std. beta = -0.01, 95% CI (-0.12, 0.10))
  • The effect of libros rec (Más de 25) is statistically non-significant and positive (beta = 0.04, 95% CI (-0.05, 0.12), t(4783) = 0.81, p = 0.419; Std. beta = 0.03, 95% CI (-0.04, 0.09))
  • The effect of apod acc div is statistically significant and positive (beta = 0.07, 95% CI (0.04, 0.11), t(4783) = 3.93, p < .001; Std. beta = 0.06, 95% CI (0.03, 0.08))
  • The effect of civic (Nivel D) is statistically non-significant and positive (beta = 0.19, 95% CI (-0.04, 0.41), t(4783) = 1.63, p = 0.103; Std. beta = 0.13, 95% CI (-0.03, 0.30))
  • The effect of civic (Nivel C) is statistically significant and positive (beta = 0.36, 95% CI (0.14, 0.58), t(4783) = 3.27, p = 0.001; Std. beta = 0.26, 95% CI (0.10, 0.41))
  • The effect of civic (Nivel B) is statistically significant and positive (beta = 0.54, 95% CI (0.32, 0.76), t(4783) = 4.89, p < .001; Std. beta = 0.39, 95% CI (0.23, 0.54))
  • The effect of civic (Nivel A) is statistically significant and positive (beta = 0.62, 95% CI (0.40, 0.85), t(4783) = 5.48, p < .001; Std. beta = 0.45, 95% CI (0.29, 0.61))
  • The effect of apdis fa is statistically significant and positive (beta = 0.07, 95% CI (0.02, 0.12), t(4783) = 2.69, p = 0.007; Std. beta = 0.04, 95% CI (0.01, 0.07))
  • The effect of mean apdis fa is statistically non-significant and negative (beta = -0.05, 95% CI (-0.22, 0.11), t(4783) = -0.63, p = 0.527; Std. beta = -0.01, 95% CI (-0.04, 0.02))
  • The effect of etnia2 is statistically non-significant and positive (beta = 0.08, 95% CI (-0.08, 0.23), t(4783) = 0.96, p = 0.335; Std. beta = 0.02, 95% CI (-0.02, 0.05))
  • The effect of inmigrante2 is statistically non-significant and positive (beta = 0.29, 95% CI (-0.85, 1.43), t(4783) = 0.50, p = 0.619; Std. beta = 8.48e-03, 95% CI (-0.02, 0.04))
  • The effect of escolaridad is statistically non-significant and negative (beta = -0.04, 95% CI (-0.12, 0.04), t(4783) = -0.90, p = 0.368; Std. beta = -0.02, 95% CI (-0.05, 0.02))

Standardized parameters were obtained by fitting the model on a standardized version of the dataset. 95% Confidence Intervals (CIs) and p-values were computed using a Wald t-distribution approximation. and We fitted a linear mixed model (estimated using REML and nloptwrap optimizer) to predict est_acc_div with escolaridad (formula: est_acc_div ~ educacion_rec + libros_rec + apod_acc_div + civic + apdis_fa + mean_apdis_fa + etnia2 + inmigrante2 + escolaridad). The model included mrbd as random effect (formula: ~1 | mrbd). The model’s total explanatory power is weak (conditional R2 = 0.03) and the part related to the fixed effects alone (marginal R2) is of 0.02. The model’s intercept, corresponding to escolaridad = 0, is at 5.95 (95% CI (5.20, 6.69), t(4783) = 15.71, p < .001). Within this model:

  • The effect of educacion rec (Ed Media) is statistically significant and negative (beta = -0.16, 95% CI (-0.32, -4.19e-03), t(4783) = -2.01, p = 0.044; Std. beta = -0.11, 95% CI (-0.23, -3.00e-03))
  • The effect of educacion rec (Ed Tecnica) is statistically non-significant and negative (beta = -0.14, 95% CI (-0.31, 0.03), t(4783) = -1.64, p = 0.101; Std. beta = -0.10, 95% CI (-0.22, 0.02))
  • The effect of educacion rec (Universidad o posgrado) is statistically non-significant and negative (beta = -0.08, 95% CI (-0.25, 0.09), t(4783) = -0.92, p = 0.358; Std. beta = -0.06, 95% CI (-0.18, 0.07))
  • The effect of educacion rec (Ns/Nr) is statistically non-significant and negative (beta = -0.02, 95% CI (-0.17, 0.14), t(4783) = -0.20, p = 0.842; Std. beta = -0.01, 95% CI (-0.12, 0.10))
  • The effect of libros rec (Más de 25) is statistically non-significant and positive (beta = 0.04, 95% CI (-0.05, 0.12), t(4783) = 0.81, p = 0.419; Std. beta = 0.03, 95% CI (-0.04, 0.09))
  • The effect of apod acc div is statistically significant and positive (beta = 0.07, 95% CI (0.04, 0.11), t(4783) = 3.93, p < .001; Std. beta = 0.06, 95% CI (0.03, 0.08))
  • The effect of civic (Nivel D) is statistically non-significant and positive (beta = 0.19, 95% CI (-0.04, 0.41), t(4783) = 1.63, p = 0.103; Std. beta = 0.13, 95% CI (-0.03, 0.30))
  • The effect of civic (Nivel C) is statistically significant and positive (beta = 0.36, 95% CI (0.14, 0.58), t(4783) = 3.27, p = 0.001; Std. beta = 0.26, 95% CI (0.10, 0.41))
  • The effect of civic (Nivel B) is statistically significant and positive (beta = 0.54, 95% CI (0.32, 0.76), t(4783) = 4.89, p < .001; Std. beta = 0.39, 95% CI (0.23, 0.54))
  • The effect of civic (Nivel A) is statistically significant and positive (beta = 0.62, 95% CI (0.40, 0.85), t(4783) = 5.48, p < .001; Std. beta = 0.45, 95% CI (0.29, 0.61))
  • The effect of apdis fa is statistically significant and positive (beta = 0.07, 95% CI (0.02, 0.12), t(4783) = 2.69, p = 0.007; Std. beta = 0.04, 95% CI (0.01, 0.07))
  • The effect of mean apdis fa is statistically non-significant and negative (beta = -0.05, 95% CI (-0.22, 0.11), t(4783) = -0.63, p = 0.527; Std. beta = -0.01, 95% CI (-0.04, 0.02))
  • The effect of etnia2 is statistically non-significant and positive (beta = 0.08, 95% CI (-0.08, 0.23), t(4783) = 0.96, p = 0.335; Std. beta = 0.02, 95% CI (-0.02, 0.05))
  • The effect of inmigrante2 is statistically non-significant and positive (beta = 0.29, 95% CI (-0.85, 1.43), t(4783) = 0.50, p = 0.619; Std. beta = 8.48e-03, 95% CI (-0.02, 0.04))
  • The effect of escolaridad is statistically non-significant and negative (beta = -0.04, 95% CI (-0.12, 0.04), t(4783) = -0.90, p = 0.368; Std. beta = -0.02, 95% CI (-0.05, 0.02))

Standardized parameters were obtained by fitting the model on a standardized version of the dataset. 95% Confidence Intervals (CIs) and p-values were computed using a Wald t-distribution approximation.

The model’s total explanatory power is weak (conditional R2 = 0.03) and the part related to the fixed effects alone (marginal R2) is of 0.02

Column

Model information

---
title: "Regression model summary from `{easystats}`"
output: 
  flexdashboard::flex_dashboard:
    theme:
      version: 4
      # bg: "#101010"
      # fg: "#FDF7F7" 
      primary: "#0054AD"
      base_font:
        google: Prompt
      code_font:
        google: JetBrains Mono
params:
  model: model
  check_model_args: check_model_args
  parameters_args: parameters_args
  performance_args: performance_args
---

```{r setup, include=FALSE}
library(flexdashboard)
library(easystats)

# Since not all regression model are supported across all packages, make the
# dashboard chunks more fault-tolerant. E.g. a model might be supported in
# `{parameters}`, but not in `{report}`.
#
# For this reason, `error = TRUE`
knitr::opts_chunk$set(
  error = TRUE,
  out.width = "100%"
)
```

```{r}
# Get user-specified model data
model <- params$model

# Is it supported by `{easystats}`? Skip evaluation of the following chunks if not.
is_supported <- insight::is_model_supported(model)

if (!is_supported) {
  unsupported_message <- sprintf(
    "Unfortunately, objects of class '%s' are not yet supported in {easystats}.\n
    For a list of supported models, see `insight::supported_models()`.",
    class(model)[1]
  )
}
```


Model fit 
=====================================  

Column {data-width=700}
-----------------------------------------------------------------------

### Assumption checks

```{r check-model, eval=is_supported, fig.height=10, fig.width=10}
check_model_args <- c(list(model), params$check_model_args)
do.call(performance::check_model, check_model_args)
```

```{r, eval=!is_supported}
cat(unsupported_message)
```

Column {data-width=300}
-----------------------------------------------------------------------

### Indices of model fit

```{r, eval=is_supported}
# `{performance}`
performance_args <- c(list(model), params$performance_args)
table_performance <- do.call(performance::performance, performance_args)
print_md(table_performance, layout = "vertical", caption = NULL)
```


```{r, eval=!is_supported}
cat(unsupported_message)
```

For interpretation of performance metrics, please refer to <a href="https://easystats.github.io/performance/reference/model_performance.html" target="_blank">this documentation</a>.

Parameter estimates
=====================================  

Column {data-width=550}
-----------------------------------------------------------------------

### Plot

```{r dot-whisker, eval=is_supported}
# `{parameters}`
parameters_args <- c(list(model), params$parameters_args)
table_parameters <- do.call(parameters::parameters, parameters_args)

plot(table_parameters)
```


```{r, eval=!is_supported}
cat(unsupported_message)
```

Column {data-width=450}
-----------------------------------------------------------------------

### Tabular summary

```{r, eval=is_supported}
print_md(table_parameters, caption = NULL)
```


```{r, eval=!is_supported}
cat(unsupported_message)
```

To find out more about table summary options, please refer to <a href="https://easystats.github.io/parameters/reference/model_parameters.html" target="_blank">this documentation</a>.


Predicted Values
=====================================  

Column {data-width=600}
-----------------------------------------------------------------------

### Plot

```{r expected-values, eval=is_supported, fig.height=10, fig.width=10}
# `{modelbased}`
int_terms <- find_interactions(model, component = "conditional", flatten = TRUE)
con_terms <- find_variables(model)$conditional

if (is.null(int_terms)) {
  model_terms <- con_terms
} else {
  model_terms <- clean_names(int_terms)
  int_terms <- unique(unlist(strsplit(clean_names(int_terms), ":", fixed = TRUE)))
  model_terms <- c(model_terms, setdiff(con_terms, int_terms))
}

text_modelbased <- lapply(unique(model_terms), function(i) {
  grid <- get_datagrid(model, at = i, range = "grid", preserve_range = FALSE)
  estimate_expectation(model, data = grid)
})

ggplot2::theme_set(theme_modern())
# all_plots <- lapply(text_modelbased, function(i) {
#   out <- do.call(visualisation_recipe, c(list(i), modelbased_args))
#   plot(out) + ggplot2::ggtitle("")
# })
all_plots <- lapply(text_modelbased, function(i) {
  out <- visualisation_recipe(i, show_data = "none")
  plot(out) + ggplot2::ggtitle("")
})

see::plots(all_plots, n_columns = round(sqrt(length(text_modelbased))))
```


```{r, eval=!is_supported}
cat(unsupported_message)
```

Column {data-width=400}
-----------------------------------------------------------------------

### Tabular summary

```{r, eval=is_supported, results="asis"}
for (i in text_modelbased) {
  tmp <- print_md(i)
  tmp <- gsub("Variable predicted", "\nVariable predicted", tmp)
  tmp <- gsub("Predictors modulated", "\nPredictors modulated", tmp)
  tmp <- gsub("Predictors controlled", "\nPredictors controlled", tmp)
  print(tmp)
}
```


```{r, eval=!is_supported}
cat(unsupported_message)
```


Text reports
=====================================    

Column {data-width=500}
-----------------------------------------------------------------------

### Textual summary

```{r, eval=is_supported, results='asis', collapse=TRUE}
# `{report}`
text_report <- report(model)
text_report_performance <- report_performance(model)

gsub("]", ")", gsub("[", "(", text_report, fixed = TRUE), fixed = TRUE)
cat("\n")
gsub("]", ")", gsub("[", "(", text_report_performance, fixed = TRUE), fixed = TRUE)
```


```{r, eval=!is_supported}
cat(unsupported_message)
```

Column {data-width=500}
-----------------------------------------------------------------------

### Model information

```{r, eval=is_supported}
model_info_data <- insight::model_info(model)

model_info_data <- datawizard::data_to_long(as.data.frame(model_info_data))

DT::datatable(model_info_data)
```

```{r, eval=!is_supported}
cat(unsupported_message)
```